# -*- coding:utf8 -*-
from filter_words import FilterWord


def get_date_list():
    """
    得到时间段列表
    :return:
    """
    return [
        '2013-01-31 01:00:00_2013-01-31 03:00:00',
        '2013-01-31 03:00:00_2013-01-31 05:00:00',
        '2013-01-31 05:00:00_2013-01-31 10:00:00',
        '2013-01-31 10:00:00_2013-01-31 20:00:00',
        '2013-01-31 21:00:00_2013-02-01 00:00:00',
        '2013-02-01 00:00:00_2013-02-01 10:00:00',
        '2013-02-01 10:00:00_2013-02-02 00:00:00'
    ]


def run(from_date=None, to_date=None, date_nums=40, save_path='./data/', date_list=None):
    """
    获取数据矩阵
    :return:
    """
    f = FilterWord()
    f.union_data_run_and_save(from_date=from_date, to_date=to_date, save_path='./data/', date_list=date_list)


if __name__ == "__main__":
    run(to_date='2013-02-20 00:00:00',
        date_nums=40,
        save_path='./data/',
        date_list=get_date_list())
